<?php 
    session_start();
    include("connect.php"); 
	
	if (!isset($_SESSION["taikhoan"]))
	{
		header("Location: sv-dangnhap.php");
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Trang chủ sinh viên</title>
<style type="text/css">
<!--
a	{
		color: #006600;
		text-decoration: none;
	}

a:hover { COLOR: #CC0000}

.style2 {
	font-size: 18px;
	font-weight: bold;
	color: #FFFFFF;
}
.style3 {font-size: 14px; font-weight: bold; color: #FFFFFF; }
.style4 {
	color: #000099;
	font-weight: bold;
	font-size:20px;
}
.style5 {	color: #FFFFFF;
	font-weight: bold;
	font-size: 30px;
}
.bg { 	border-bottom-color:#666666;
		border-bottom-style:dotted;
		border-bottom-width:thin;	}
-->
</style>
</head>

<body>
<?php
        $masv = $_SESSION["sv"];
		$query = "select a.ma_sv, a.ma_lop, a.ten_sv, a.namsinh_sv,
		a.gioitinh_sv, c.ten_khoa, d.ten_bm, b.khoa
		from `sinh vien` a, `lop sinh vien` b, `khoa` c, `bo mon` d
		where a.ma_sv = '$masv'
		and a.ma_lop = b.ma_lop
		and b.ma_bm = d.ma_bm
		and d.ma_khoa = c.ma_khoa";
		
		$result = mysql_query($query, $db) or die("Loi");
		
		while ($rows = mysql_fetch_array($result))
		{
			$mssv = $rows["0"];
			$malop = $rows["1"];
			$ten = $rows["2"];
			$namsinh = $rows["3"];
			$gioitinh = $rows["4"];
			$khoa = $rows["5"];
			$bomon = $rows["6"];
			$k = $rows["7"];
	    }
	
?>

<table width="900" height="550" border="0" align="center" bordercolorlight="#CCCCCC" style="border:1px solid #CCCCCC">

<!-- đầu trang --> 	
	<tr> <td width="900" height="70" background="image/header.gif">
    	
        <table width="100%" height="100%" border="0"> 
          <tr>
       		
          <td width="10%" rowspan="2"><img src="image/logo.gif" width="100%" height="70" /></td>
            
            <td width="60%" rowspan="2" height="70" align="center" style="font-size:24px"><div align="center">
              <blockquote>
                <p><span class="style5">Website ĐÁNH GIÁ HỌC PHẦN</span></p>
              </blockquote>
          </div></td>
   		  	
          <td width="30%" valign="bottom"> <table>
       		  <tr><td valign="bottom">
           	  <div align="center" class="style3">
              	<a class="style3" href="helpsv.htm" target="_blank">Hướng dẫn</a> | <a class="style3" href="sv-trangchu.php">Trang chủ</a> | <a class="style3" href="logout.php">Thoát</a></div></td></tr>
       	  	  <tr><td valign="bottom">
           	  <div align="center" class="style3">Xin chào, <?php echo $ten; ?> - <?php echo $mssv; ?></div></td></tr> 
				<tr><td align="center"><span><a href="frmDoiMK.php" class="style3"><b>Đổi mật khẩu</b></a></span></td></tr>
		  </table> </td>
        
        </tr> </table>
    
    </td> </tr>

	<tr> <td height="50" width="100%" bordercolor="#FFFFFF"></td> </tr>

<!-- thân trang --> 	
	<tr> <td height="350" align="right" valign="top" bordercolor="#FFFFFF">
   	  <table width="800" height="350" border="0" align="center" bordercolor="#FFFFFF"> <tr>
          <td width="500" style="border:1px solid #0066FF" valign="top">
          	
<!-- Thông tin sinh viên -->            
        <table width="450" align="center" cellspacing="0">
       		  
       	  		<tr valign="middle" height="50"> 
               		<td align="center" colspan="3" class="bg">
                		<span class="style4"  bordercolor="#FFFFFF">THÔNG TIN SINH VIÊN</span></td></tr>
                
	          <tr>
					<td width="140" height="30" class="bg" style="font-size:18px; "> <div align="right">MSSV :</div></td>
               		<td width="5" class="bg">&nbsp;</td>
                    <td width="305" class="bg" style="font-size:18px;"> 
           	    		<div align="left"><strong><?php echo $mssv; ?></strong></div></td>
              </tr>
                
              	<tr>
               		<td height="30" class="bg" style="font-size:18px;"><div align="right">Họ tên :</div></td>
               	  	<td width="5" class="bg">&nbsp;</td>
                    <td class="bg" style="font-size:18px;" ><div align="left"><strong><?php echo $ten; ?></strong></div></td>
              </tr>
                
           	  <tr>
       				<td height="30" class="bg" style="font-size:18px; "><div align="right">Năm sinh :</div></td>
                  	<td width="5" class="bg">&nbsp;</td>
                	<td class="bg" style="font-size:18px; "><div align="left"><strong><?php echo $namsinh; ?></strong></div></td>
              </tr>
                
              <tr>
                  	<td height="30" class="bg" style="font-size:18px;"><div align="right">Giới tính :</div></td>
                  	<td width="5" class="bg">&nbsp;</td>
              	    <td class="bg" style="font-size:18px; " ><div align="left"><strong>
               	  	<?php if ($gioitinh==1) echo "Nam";
								else echo "Nữ"; ?> </strong></div></td>
              </tr>
                
              <tr>
                  	<td height="30" class="bg" style="font-size:18px; "><div align="right">Lớp :</div></td>
                  	<td width="5" class="bg">&nbsp;</td>
              	    <td class="bg" style="font-size:18px; " ><div align="left"><strong><?php echo $malop; ?></strong></div></td>
              </tr>
                
              <tr>
                  	<td height="30" class="bg" style="font-size:18px;"><div align="right">Ngành học :</div></td>
                  	<td width="5" class="bg">&nbsp;</td>
              	    <td class="bg" style="font-size:18px;" ><div align="left"><strong><?php echo $bomon; ?></strong></div></td>
              </tr>
               
              <tr>
                  	<td height="30" class="bg" style="font-size:18px; "><div align="right">Khóa học :</div></td>
                  	<td width="5" class="bg">&nbsp;</td>
                  	<td class="bg" style="font-size:18px;" ><div align="left"><strong><?php echo $k; ?></strong></div></td>
              </tr>
                
              <tr>
                  	<td height="30" class="bg" style="font-size:18px;"><div align="right">Khoa :</div></td>
                  	<td width="5" class="bg">&nbsp;</td>
                    <td class="bg" style="font-size:18px; "><div align="left"><strong><?php echo $khoa; ?></strong></div></td>
              </tr>
              
              	<tr valign="middle" height="30"> 
               		<td align="center" colspan="3">&nbsp;</td>
       	  		</tr>
              
          </table></td>
          
          <td width="280" height="250" valign="middle" align="center">
          <table width="250" height="340" border="0" style="border:1px solid #0066FF">
            <tr bordercolor="#FFFFFF">  
              <td bordercolor="#FFFFFF" style="font-size:18px" align="center">
              	<img src='image/danhgia.png' width='70' height='70' border="0"/> <br />
                <p><strong><a href="sv-chonhp.php">Đánh Giá Học Phần</a></strong></p>
              </td>
             </tr>
            <tr bordercolor="#FFFFFF">  
              <td bordercolor="#FFFFFF" style="font-size:18px" align="center">
              	<img src='image/xem.gif' width='70' height='70' border="0"/> <br />
                <p><strong><a href= "sv-ketqua.php"> Kết Quả Đánh Giá Học Phần</a></strong></p>
              </td>
             </tr>
          </table></td>
        
        </tr> </table>
      </td> </tr>
<!-- cuối trang -->  
	<tr> <td height="55" width="100%" bordercolor="#FFFFFF"></td> </tr>

	<tr> <td height="28" background="image/footer.gif">
    	<table width="100%"> <tr >
    	
    	</tr> </table>
    </td> </tr>
</table>

</body>
</html>
